﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BookAdd.aspx.cs" Inherits="DBA.Web.BookManage.BookAdd" %>
 
<%@ Register Assembly="SqControls" Namespace="SqControls.SqVerification" TagPrefix="cc2" %>

<%@ Register Assembly="SqControls" Namespace="SqControls.SqJqueryManager" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="/Scripts/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="/Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
    <script src="/Scripts/Public.js" type="text/javascript"></script>
    <link href="/Styles/CommonEdit.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/date/WdatePicker.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var DG = frameElement.lhgDG;
        $(function () {
            //加载
            if ($("#hidType").val() != "0") {
                DG.addBtn('obtn', '提 交', function () {
                    if (validateControlsById("tbEdit")) {
                        parent.alertMsg.confirm("是否确认执行保存?", {
                            okCall: function () {
                                Public.CallBack("lnkSave", "");
                            }
                        });
                    }
                });
            }
            //            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, e) {
            //                if ($("#hdResult").val() == "1") {
            //                    Public.OpertAlert("操作成功!", true, "AspNetPager1");

            //                    //Public.GetParentWindow().Public.RefreshTable('spiltPager');
            //                    //DG.cannel();
            //                } else {
            //                    alert("操作失败,请重试!");
            //                }
            //            });

        });

        function downFile(id) {
            //alert(id);
            var url = "/ProjectManage/DownFile.aspx?type=3&id=" + id;
            window.open(url);
        }

        function deleteAtt(id) {
            $("#hidAttach").val($("#hidAttach").val() + "," + id);
            $("#div" + id).css("display", "none");

            //alert($("#hidAttach").val());
        }

        function setSelectUser(id, name) {
            $("#txtspPerson").val(name);
            $("#hidSelectUser").val(id);

        }

        function btnChoose() {
            var url = "/ProjectManage/SelectUser.aspx";
            winAdd = Public.ShowWindow("选择教师", url, 850, 650, null, true);

        }
    </script>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
   <%-- <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>--%>
    <cc1:JqueryManager ID="JqueryManager1" runat="server" SelectedVersion="None" SelectedControlScript="TextBox"
        VerificationManager="true"></cc1:JqueryManager>
   <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
            <div class="divTable" style="width: 600px;">
            <asp:Panel ID="pan_tab" runat="server">
                <table id="tbEdit" cellspacing="0" cellpadding="0" style="width: 100%;">
                    <tr>
                        <td class="r_left">
                            著作名称：
                        </td>
                        <td>
                             <textarea ID="txt_ps_PaperName" runat="server" class="in_sty required" name="S1" 
                                  style="width: 443px; height: 65px; text-align: left;" type="text"></textarea><cc2:ValidateEmpty
                                ID="ValidateEmpty1" runat="server" ForeColor="Red" ControlID="txt_ps_PaperName">*</cc2:ValidateEmpty>
                          
                        </td>
                    </tr>
      <tr>
                        <td class="r_left">
                            出版社名称：
                        </td>
                        <td>
                                   <textarea ID="txt_ps_PublicationName" runat="server" class="in_sty required" name="S1" 
                                  style="width: 443px; height: 65px; text-align: left;" type="text"></textarea>
                            
                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                            字数：
                        </td>
                        <td>
                            <input class="in_sty required" id="txt_ps_SumLength" type="text" runat="server" style="text-align:left;" />
                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                            著作类别：
                        </td>
                        <td>
                            <input class="in_sty required" id="txt_ps_Class" type="text" runat="server" style="text-align:left;" />
                        </td>
                    </tr>
                    <tr>
                        <td class="r_left">
                            出版日期：
                        </td>
                        <td>
                            <input class="in_sty required" readonly id="txt_ps_date" type="text" runat="server" style="text-align:left;" onfocus="WdatePicker({'dateFmt':'yyyy-MM'})">  
                        </td>
                    </tr>
                    <tr>
                        <td class="r_left">
                            译否：
                        </td>
                        <td>
                            &nbsp;<asp:CheckBox ID="cbIsTranslation" runat="server" />
                        </td>
                    </tr>              
                 
               
                      
                      <tr>
                        <td class="r_left">
                             第一作者：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_ps_Person1" CssClass="in_sty required"  runat="server" style="text-align:left;"></asp:TextBox>
                                                     
                            <asp:DropDownList ID="ddl_Person1Is" runat="server">
                                 <asp:ListItem Selected="True" Value="-2">请选择</asp:ListItem>
                                <asp:ListItem  Value="1">校内教师</asp:ListItem>
                                <asp:ListItem Value="2">校内学生</asp:ListItem>
                                <asp:ListItem Value="-1">校外人员</asp:ListItem>
                            </asp:DropDownList>
                                                     
                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                             第二作者：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_ps_Person2" CssClass="in_sty required"  runat="server" style="text-align:left;"></asp:TextBox>
                            <asp:DropDownList ID="ddl_Person2Is" runat="server">
                                 <asp:ListItem Selected="True" Value="-2">请选择</asp:ListItem>
                                <asp:ListItem  Value="1">校内教师</asp:ListItem>
                                <asp:ListItem Value="2">校内学生</asp:ListItem>
                                <asp:ListItem Value="-1">校外人员</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                             第三作者：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_ps_Person3" CssClass="in_sty required"  runat="server" style="text-align:left;"></asp:TextBox>
                         
                            <asp:DropDownList ID="ddl_Person3Is" runat="server">
                            <asp:ListItem Selected="True" Value="-2">请选择</asp:ListItem>
                                <asp:ListItem  Value="1">校内教师</asp:ListItem>
                                <asp:ListItem Value="2">校内学生</asp:ListItem>
                                <asp:ListItem Value="-1">校外人员</asp:ListItem>
                            </asp:DropDownList>
                         
                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                             第四作者：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_ps_Person4" CssClass="in_sty required"  runat="server" style="text-align:left;"></asp:TextBox>
                         
                            <asp:DropDownList ID="ddl_Person4Is" runat="server">
                                 <asp:ListItem Selected="True" Value="-2">请选择</asp:ListItem>
                                <asp:ListItem  Value="1">校内教师</asp:ListItem>
                                <asp:ListItem Value="2">校内学生</asp:ListItem>
                                <asp:ListItem Value="-1">校外人员</asp:ListItem>
                            </asp:DropDownList>
                         
                        </td>
                    </tr>
                       <tr>
                        <td class="r_left">
                             第五作者：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_ps_Person5" CssClass="in_sty required"  runat="server" style="text-align:left;"></asp:TextBox>
                         
                            <asp:DropDownList ID="ddl_Person5Is" runat="server">
                                 <asp:ListItem Selected="True" Value="-2">请选择</asp:ListItem>
                                <asp:ListItem  Value="1">校内教师</asp:ListItem>
                                <asp:ListItem Value="2">校内学生</asp:ListItem>
                                <asp:ListItem Value="-1">校外人员</asp:ListItem>
                            </asp:DropDownList>
                         
                        </td>
                    </tr>
                      <tr>
                          <td class="r_left">
                              备注：</td>
                          <td>
                              <textarea ID="txt_ps_Demo" runat="server" class="in_sty required" name="S1" 
                                  style="width: 443px; height: 65px; text-align: left;" type="text"></textarea></td>
                    </tr>
                      <tr>
                        <td class="r_left">
                            附件1：
                        </td>
                        <td>
                            <input id="File1" type="file" name="File" runat="server" style="width: 300px"/>

                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                            附件2：
                        </td>
                        <td>
                            <input id="File2" type="file" name="File" runat="server" style="width: 300px"/>

                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                            附件3：
                        </td>
                        <td>
                            <input id="File3" type="file" name="File" runat="server" style="width: 300px"/>

                        </td>
                    </tr>
                      <tr>
                        <td class="r_left">
                            已有附件：
                        </td>
                        <td id="tdAttach">
                            <%=attachHtml %>
                            </td>
                    </tr>
                </table>
              </asp:Panel>
            </div>
            <div style="display:none;">
                <asp:LinkButton ID="lnkSave" runat="server" onclick="lnkSave_Click"></asp:LinkButton><asp:HiddenField ID="hdResult" runat="server" /></div>
      </div>
       <%-- </ContentTemplate>
    </asp:UpdatePanel>--%>
    <asp:HiddenField ID="hidID" runat="server" />
   <asp:HiddenField ID="hidFileName" runat="server" />
    <asp:HiddenField ID="hidAttach" runat="server" />
     <asp:HiddenField ID="hidSelectUser" runat="server" />
      <asp:HiddenField ID="hidType" runat="server" />
    </form>
</body>
</html>

